package com.hylc.biz.ui.br;

import static com.xls.commonlibrary.constant.BroadAction.ACTION_BR_WEIXIN_LOGIN;
import static com.xls.commonlibrary.util.eventbus.ConstEventBus.EVENT_WX_INFO_GET_SUCCESS;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

import com.orhanobut.logger.Logger;
import com.xls.commonlibrary.util.eventbus.MessageEvent;

import org.greenrobot.eventbus.EventBus;

// 跨moudule通知使用  eg：微信登陆
public class Br extends BroadcastReceiver {
    @Override
    public void onReceive(Context context, Intent intent) {
        if (intent == null) return;
        if (intent.getAction() == null) return;

        Logger.d("==========BroadcastReceiver=========onReceive=================");
        Logger.d(intent.getAction());

        if (ACTION_BR_WEIXIN_LOGIN.equals(intent.getAction())) {
            EventBus.getDefault().post(new MessageEvent(EVENT_WX_INFO_GET_SUCCESS, "success"));
        }
    }
}
